快速傅立葉轉換

簡短描述

檔案: \examples\Processing\FastFourierTransform\mE5-MA-VCL\fft.va

檔案: \examples\Processing\FastFourierTransform\iF-CXP12-Q\fft.va

預設平台: mE5-MA-VCL 以及iF-CXP12-Q

簡短說明

展示FFT 運算子的使用方法。 此小程式會產生一個正弦波波形,並執行 FFT 運算。 結果顯示的是頻域部分。 請使用「VisualApplets 」模擬程式。

The provided example will demonstrate the use of the FFT. In the example, a simple sine wave with period 256 and magnitude ± 16384 and an image width of 2048 pixels is generated.

正弦波

圖 296. 正弦波


VisualApplets 的實作非常簡單。將正弦波輸入傳送至 FFT 運算子。 將所得的實部與虛部分別平方後相加。 因此輸出即為絕對值的平方。 結果顯示在 x = 8 處出現預期中的峰值,即週期為 2048 / 8 = 256。 與 Matlab 的 FFT 計算結果比較後,發現兩者在相同的精度範圍內結果非常接近。 使用 H-Box「DynamicReduceResolutionFFTOut」來平移結果並降低其解析度。對於 給定的正弦波而言,此步驟並非必要,但可作為其他需求的選項。